using Asxsyd92Core.Utils;
using System;
using System.ComponentModel;

namespace WebOS.Modle
{

    [TableName("WorkFlow")]
    [Description("WorkFlow")]
    public partial class WorkFlow
    {
        public System.Guid ID { get; set; }
        public string Name { get; set; }
        public System.Guid Type { get; set; }
        public string Manager { get; set; }
        public string InstanceManager { get; set; }
        public System.DateTime CreateDate { get; set; }
        public System.Guid CreateUserID { get; set; }
        public string DesignJSON { get; set; }
        public Nullable<System.DateTime> InstallDate { get; set; }
        public Nullable<System.Guid> InstallUserID { get; set; }
        public string RunJSON { get; set; }
        public int Status { get; set; }
        [DbField(false)]
        public long Count { get; set; }
        [DbField(false)]
        public WebOS.Modle.WorkFlowRun.RunJSON runjson
        {
            get
            {
                try
                {
                    return this.RunJSON == null ? null : Newtonsoft.Json.JsonConvert.DeserializeObject<WebOS.Modle.WorkFlowRun.RunJSON>(this.RunJSON);
                }
                catch (Exception ex) { var s = ex.Message; return null; }
            }
        }

        [DbField(false)]
        public WebOS.Modle.WorkFlowRun.RunJSON designjson
        {
            get
            {
                try
                {
                    return this.DesignJSON == null ? null : Newtonsoft.Json.JsonConvert.DeserializeObject<WebOS.Modle.WorkFlowRun.RunJSON>(this.DesignJSON);
                }
                catch (Exception ex) { var s = ex.Message; return null; }
            }

        }
    }
}
